In [2]:
from miscpy.utils.sympyhelpers import *
init_printing()
In [3]:
mu,rg,I1,I2,I3,n,w1,w2,w3,w1d,w2d,w3d,t = symbols('mu,r_G,I_1,I_2,I_3,n,omega_1,omega_2,omega_3,omegadot_1,omegadot_2,omegadot_3,t')
diffmap = {w1:w1d,w2:w2d,w3:w3d}
In [4]:
bCa = fancyMat('{}^\mathcal{B}C^{\mathcal{A}}',(3,3));bCa
Out[4]:
In [5]:
en_B = bCa*Matrix([0,1,0]); en_B
Out[5]:
In [6]:
Ig_B = diag(I1,I2,I3)
In [7]:
Mg_B = simplify(skew(en_B)*Ig_B*en_B); Mg_B
Out[7]:
In [ ]:
Circular orbit
In [8]:
iWa_A = Matrix([0,0,n]); iWa_A
Out[8]:
In [9]:
iWb_B = Matrix([w1,w2,w3]); iWb_B
Out[9]:
In [10]:
tmp1 = simplify(Ig_B*difftotalmat(iWb_B,t,diffmap) + skew(iWb_B)*Ig_B*iWb_B - 3*n**2*Mg_B);tmp1
Out[10]:
In [11]:
simplify(tmp1)
Out[11]:
In [12]:
aWb_B = iWb_B - bCa*iWa_A; aWb_B
Out[12]:
In [13]:
dbCa = simplify(-skew(aWb_B)*bCa); dbCa
Out[13]:
In [14]:
dbCa[:,1]
Out[14]:
In [ ]: